<template>
  <view class="content">
    <view class="rowBox mrg50T">
      <view class="sliderBox">
        <RangeSlider
          :width="slideWidth"
          :height="slideHeight"
          :blockSize="slideBlockSize"
          :min="slideMin"
          :max="slideMax"
          :values="rangeValues"
          @onEndChange="onEndChange"
        >
        </RangeSlider>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import RangeSlider from './range-slider.vue';

const minValue = ref(0);
const maxValue = ref(0);
const rangeValues = ref([0, 5000]);
const slideWidth = ref(500);
const slideHeight = ref(80);
const slideBlockSize = ref(28);
const slideMin = ref(0);
const slideMax = ref(5000);

const onEndChange = (e) => {
  console.log('onEndChange', e);
};
</script>

<style>
view {
  display: flex;
}

.content {
  justify-content: center;
  flex-direction: column;
}

.text-center {
  justify-content: center;
}

.rowBox {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.mrg50T {
  margin-top: 50upx;
}

.tips {
  color: #999;
  font-size: 24upx;
  text-align: center;
  margin-top: 100upx;
}

.testBtn {
  margin-top: 100upx;
}
</style>
